<nz-modal [(nzVisible)]="isVisible" nzTitle="確認メッセージ" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
    <div *nzModalContent>
        登録します。よろしいですか
    </div>
    <div *nzModalFooter>
        <button nz-button nzType="default" (click)="handleCancel()">キヤンセル</button>
        <button nz-button nzType="primary" (click)="handleOk()"> 登録</button>
    </div>
    <p *nzModalContent> 登録します。よろしいですか？</p>
</nz-modal>
<div class="myForm">
    <h3>{{divtitle}}</h3>

    <form [formGroup]="fromModel" (ngSubmit)="onSubmit()">

        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="id">No</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <input nz-input formControlName='id' id="id" />
            </nz-form-control>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">名前</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <input nz-input formControlName='name' id="name" />
            </nz-form-control>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="sex" nzRequired>性别</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <nz-input-group>
                    <nz-select formControlName='sex'>
                        <nz-option nzLabel="男" nzValue="男"></nz-option>
                        <nz-option nzLabel="女" nzValue="女"></nz-option>
                    </nz-select>
                </nz-input-group>
            </nz-form-control>
        </nz-form-item>

        <nz-form-item>
            <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="addr">住所</nz-form-label>
            <nz-form-control [nzSm]="14" [nzXs]="24">
                <input nz-input formControlName='addr' id="addr" />
            </nz-form-control>
        </nz-form-item>


        <div class="myButton">
            <nz-form-item nz-row>
                <nz-form-control nzSpan="12" [nzXs]="24">
                    <button type="button" class="b1" (click)="goBack()">キヤンセル</button>
                </nz-form-control>
            </nz-form-item>

            <nz-form-item nz-row>
                <nz-form-control nzSpan="12" [nzXs]="24">
                    <button type="button" class="b1" *ngIf="userId > 0" (click)="updateUser(user)">登録</button>
                    <input type="button" class="b1" *ngIf="userId <= 0" [value]="'登録'" [disabled]="Disflag"
                        (click)="addUser(user)" />
                </nz-form-control>
            </nz-form-item>
        </div>

    </form>

</div>